feat(tooling): integrate daily anonymizer for usage metrics collection#32387
feat(tooling): integrate daily anonymizer for usage metrics collection#32387NicolasMassart wants to merge 11 commits into
Conversation
ONLY WORKS ON LOCAL AS IT POINTS TO LOCAL REPO
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
PR template — items to address before "Ready for review"Warnings — informational, address before merging:
See docs/readme/ready-for-review.md for the full Definition of Ready for Review. |
# Conflicts: # yarn.lock
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Caution MetaMask internal reviewing guidelines:
|
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
None of these changes touch app source code, test page objects, flows, selectors, smoke specs, or any user-facing functionality. The yarn plugin is explicitly disabled in CI. No E2E tests need to run to validate these changes. Performance Test Selection: |
|
…metamask-mobile into feat/MCWP-644-daily-anonymizer



Warning
PREVIEW ONLY
Description
This PR integrates a daily anonymizer into the developer usage-metrics collection tooling.
The usage-tracking Yarn plugin now opportunistically triggers the anonymizer once per 24h window: the first non-CI
yarn <script>run after the window opens spawns the anonymizer as a detached, non-blocking child process. The 24h gate is read fromlast_run_atin~/.tool-usage-collection/anonymizer-state.json; the anonymizer re-checks and claims the window itself, so concurrent spawns are harmless. The trigger is best-effort and never throws into the Yarn hot path — failures are written to a localanonymizer.log.The anonymizer itself is published as
@metamask/tooling-insightand consumed here as adevDependency, pinned to a specific preview build. The trigger is disabled whenCIis set orTOOL_USAGE_COLLECTION_OPT_IN=false, consistent with the rest of the collection tooling.Also cleans up
scripts/tooling/README.md(trims the inlined dev-tooling-explorer instructions in favor of linking its repo, documents the daily anonymizer) and removes the now-unusedscripts/tooling/tsconfig.json.Changelog
CHANGELOG entry: null
Related issues
Refs: MCWP-644
Manual testing steps
N/A — developer-only tooling, disabled in CI. Verified via unit tests in
.yarn/plugins/plugin-usage-tracking.test.ts:yarn jest .yarn/plugins/plugin-usage-tracking.test.ts.last_run_atis within 24h.CIis set.Screenshots/Recordings
N/A — non-user-facing developer tooling change.
Before
After
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist